package sunwin.yoms.dao;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import sunwin.yoms.domain.resource.StadiumSubscribeDomain;
import sunwin.yoms.domain.searching.StadiumSubscribeCondition;
import sunwin.yoms.domain.searching.StadiumSubscribeInfo;

import java.util.Date;
import java.util.List;

/**
 * Created by watson on 2015/7/30.
 */
@Repository
public interface StadiumSubscribeDao extends DaoBase<StadiumSubscribeDomain>{
    //根据场馆名称查询场馆当天空闲时间段
    List<StadiumSubscribeDomain> getFreeStadiums(@Param("stadiumName") String stadiumName);
    //根据用户id查询该用户的历史预订记录
    List<StadiumSubscribeDomain> getHistoryStadiums(@Param("userID") int userID);
    //根据日期、场馆名称查询场馆空闲时间段
    List<StadiumSubscribeDomain> getFreeStadiumSubscribes(@Param("date") Date date, @Param("stadiumName") String stadiumName);
    //根据用户名，用户编号，订单号，场馆名称，开始时间，结束时间
    List<StadiumSubscribeDomain> getHistoryStadiumList(@Param("stadiumSubscribeCondition") StadiumSubscribeCondition stadiumSubscribeCondition);
    StadiumSubscribeDomain getStadiumSubscribeByNo(@Param("stadiumSubNo") String stadiumSubNo);
}
